var mongoose = require("mongoose");

var userSchema = new mongoose.Schema({
      level: { type: Number, default: 1 },
      isCreated: { type: Boolean, default: false },
      money : { type: Number, default: 0 },
      xPos: { type: Number, default: 0 },
      yPos: { type: Number, default: 0},
      date: { type: Date, default: Date.now },
      attackedZone: { type: [Number], default: [] },
      xp: { type: Number, default: 0 },
      power: { type: Number, default: 0},
      mail: { type: String, default: "" },
      password: { type: String, default: ""},
      isAdmin: { type: Boolean, default: false },
      allianceName: { type: String, default: ""},
      level_user: { type: Number, default: 1}
});

var user = mongoose.model('User', userSchema);

module.exports = {
    User: user
}